package test.db.mysql.table;

public enum ExaminationQuestionTable implements Table {
    SID(Column.sid),
    QUESTION_SID(Column.questionSid),
    EXAMINATION_PAPER_SID(Column.examinationPaperSid);
    
    private final Column column;
    private static final String TYPE_SID = "VARCHAR(20)";
    private static final String TYPE_QUESTION_SID = "VARCHAR(20)";
    private static final String TYPE_EXAMINATION_PAPER_SID = "VARCHAR(20)";

    ExaminationQuestionTable(Column column) {
        this.column = column;
    }
    
    private enum Column {
        sid {
            String getType() {
                return TYPE_SID;
            }
        },
        
        questionSid {
            String getType() {
                return TYPE_QUESTION_SID;
            }
        },
        
        examinationPaperSid {
            String getType() {
                return TYPE_EXAMINATION_PAPER_SID;
            }
        };
        
        abstract String getType();
    }
    
    public String getType() {
        return column.getType();
    }
    
    public void initData() throws Exception {
        System.out.println("CALL NOW");
    }
}